home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / subway21.zip / CDRV.DOC < prev    next >
Text File  |  1988-02-24  |  6KB  |  226 lines

  1.  
  2.  
  3.  
  4.             +--------------------+
  5.             | INT 14 H Extension |
  6.             +--------------------+
  7.  
  8.  
  9.  
  10.     CDRV.COM is a "Terminate and Stay Resident" program. It provides
  11.     several new functions for INT 14H.
  12.  
  13.     These functions use the same parameters as the usual BIOS ones :
  14.     the function number is to be placed in AH, the COM port number
  15.     (0 to 7) is to be placed in DX, whenever required.
  16.  
  17.     To install CDRV.COM, just type CDRV [Enter] at the DOS prompt,
  18.     or insert this command into the AUTOEXEC.BAT file.
  19.  
  20.     The functions then available are :
  21.  
  22.  
  23. =======
  24. AH =  0    Init port using AL (same as BIOS)
  25. =======
  26.     AL bit meaning is :
  27.  
  28.     +---+---+---+
  29.     | 7 | 6 | 5 |
  30.     +---+---+---+
  31.       |   |   |
  32.       0   0   0  for  110 bps,
  33.       0   0   1  for  150 bps,
  34.       0   1   0  for  300 bps,
  35.       0   1   1  for  600 bps,
  36.       1   0   0  for 1200 bps,
  37.       1   0   1  for 2400 bps,
  38.       1   1   0  for 4800 bps,
  39.       1   1   1  for 9600 bps.
  40.  
  41.     +---+---+
  42.     | 4 | 3 |
  43.     +---+---+
  44.       |   |
  45.       0   0  for No Parity,
  46.       0   1  for Odd Parity,
  47.       1   1  for Even Parity.
  48.  
  49.     +---+
  50.     | 2 |
  51.     +---+
  52.       |
  53.       0  for 1 stop bit,
  54.           1  for 2 stop bits.
  55.  
  56.     +---+---+
  57.     | 1 | 0 |
  58.     +---+---+
  59.       |   |
  60.       1   0  for 7 data bits,
  61.       1   1  for 8 data bits.
  62.  
  63.     Upon exit AH = LSR and AL = MSR (see function 3).
  64.  
  65.  
  66. =======
  67. AH =  1    Send character in AL (same as BIOS)
  68. =======
  69.     Upon exit AH = LSR with MSB is set in case of T.O.
  70.  
  71.  
  72. =======
  73. AH =  2    Recv character in AL (same as BIOS)
  74. =======
  75.     Upon exit AL = char and AH = LSR.
  76.     In case of T.O., AL = MSR and AH = LSR with MSB set.
  77.  
  78.  
  79. =======
  80. AH =  3    Get port status (same as BIOS)
  81. =======
  82.     Upon exit AH = LSR and AL = MSR. The meaning of their bits is :
  83.  
  84.     +---+---+---+---+---+---+---+---+
  85.     | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | (for AH)
  86.     +---+---+---+---+---+---+---+---+
  87.       |   |   |   |   |   |   |   |
  88.       |   |   |   |   |   |   |   +---> data ready (OK to read)
  89.       |   |   |   |   |   |   +-------> overrun
  90.       |   |   |   |   |   +-----------> parity error
  91.       |   |   |   |   +---------------> framing error
  92.       |   |   |   +-------------------> break detected
  93.       |   |   +-----------------------> THRE (OK to send)
  94.       |   +---------------------------> TSRE
  95.       +-------------------------------> always zero
  96.  
  97.     +---+---+---+---+---+---+---+---+
  98.     | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | (for AL)
  99.     +---+---+---+---+---+---+---+---+
  100.       |   |   |   |   |   |   |   |
  101.       |   |   |   |   |   |   |   +---> delta clear to send
  102.       |   |   |   |   |   |   +-------> delta data set ready
  103.       |   |   |   |   |   +-----------> delta ring indicator
  104.       |   |   |   |   +---------------> delta carrier detect
  105.       |   |   |   +-------------------> CTS
  106.       |   |   +-----------------------> DSR
  107.       |   +---------------------------> RI
  108.       +-------------------------------> CD
  109.  
  110.  
  111. =======
  112. AH =  4    Write AL to MCR (bit 7 = 0) or LCR (bit 7 = 1)
  113. =======
  114.     +---+---+---+---+---+---+---+---+
  115.     | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | (for MCR)
  116.     +---+---+---+---+---+---+---+---+
  117.       |   |   |   |   |   |   |   |
  118.       |   |   |   |   |   |   |   +---> DTR
  119.       |   |   |   |   |   |   +-------> RTS
  120.       |   |   |   |   |   +-----------> OUT1
  121.       |   |   |   |   +---------------> OUT2 (enable IRQ)
  122.       |   |   |   +-------------------> enable loopback (*)
  123.       |   |   +-----------------------> always zero
  124.       |   +---------------------------> always zero
  125.       +-------------------------------> 0 to select MCR
  126.  
  127.     In loopback mode : TXD ---> RXD
  128.                DTR ---> DSR
  129.                RTS ---> CTS
  130.                OUT1 ---> RI
  131.                OUT2 ---> CD
  132.  
  133.     +---+---+---+---+---+---+---+---+
  134.     | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | (for LCR)
  135.     +---+---+---+---+---+---+---+---+
  136.       |   |   |   |   |   |   |   |
  137.       |   |   |   |   |   |   0   0    ....... 5 data bits
  138.       |   |   |   |   |   |   0   1 ....... 6 data bits
  139.       |   |   |   |   |   |   1   0 ....... 7 data bits
  140.       |   |   |   |   |   |   1   1 ....... 8 data bits
  141.       |   |   |   |   |   |
  142.       |   |   |   |   |   0 ............... 1 stop bit
  143.       |   |   |   |   |   1 ............... 2 stop bits
  144.       |   |   |   |   |
  145.       |   |   |   |   0 ................... no parity
  146.       |   |   |   |   1 ................... parity
  147.       |   |   |   |
  148.       |   |   |   0 ....................... odd parity
  149.       |   |   |   1 ....................... even parity
  150.       |   |   |
  151.       |   |   0 ........................... no stick parity
  152.       |   |   1 ........................... stick parity
  153.       |   |
  154.       |   0 ............................... no break
  155.       |   1 ............................... send break
  156.       |
  157.       1 to select LCR
  158.  
  159.  
  160. =======
  161. AH =  5    Set baud rate according to CX (units are bits per second).
  162. =======
  163.  
  164. =======
  165. AH =  6    Set SEND TIME OUT, where CX = # of clock tics.
  166. =======
  167.  
  168. =======
  169. AH =  7    Set RECV TIME OUT, where CX = # of clock tics.
  170. =======
  171.  
  172. =======
  173. AH =  8    Set BREAK DURATION in clock tics (CX = duration).
  174. =======
  175.  
  176. =======
  177. AH =  9    Send BREAK on port DX.
  178. =======
  179.  
  180. =======
  181. AH = 10    Get version number in AH (major) and AL (minor).
  182. =======
  183.  
  184. =======
  185. AH = 11    Set I/O parms for asynch port (COM1: to COM8:)
  186. =======
  187.     DX = COM port number (0 to 7)
  188.     CX = I/O base address (eg 03F8H)
  189.     AL = IRQ mask (eg 00010000B for IRQ 4)
  190.  
  191.  
  192. =======
  193. AH = 12    Get I/O parms for asynch port (COM1: to COM8:)
  194. =======
  195.     DX = COM port number (0 to 7)
  196.     CX and AL set upon exit (see function 11)
  197.  
  198.  
  199. =======
  200. AH = 13    Set IRQ mode for port number DX. 
  201. =======
  202.     Upon exit AX = 0 if OK, AX # 0 otherwise (*).
  203.  
  204.     (*) An error is returned if any com port is already IRQ driven,
  205.     or if no IRQ line is specified for this port.
  206.  
  207. =======
  208. AH = 14    Reset IRQ mode for current port.
  209. =======
  210.  
  211. =======
  212. AH = 15    Check for char in buffer.
  213. =======
  214.     CX returns # of chars in buffer, DX returns # of lost chars (if any)
  215.     AH = number of port IRQ driven (0 for none, 1 for COM1:, etc...)
  216.     AL holds the next char to be read from buffer (the char is not
  217.     removed from buffer).
  218.  
  219. =======
  220. AH = 16    Get char from ring buffer into AL.
  221. =======
  222.     CX returns # of chars still waiting in buffer,
  223.     DX returns # of lost chars (if any),
  224.     AH returns the IRQ driven port #, MSB is set in case of T.O.
  225.  
  226.